package com.legrand.www.module.exception.ss.controller;

import com.legrand.www.module.exception.exception.CustomizeException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a")
public class ExceptionController {
    @RequestMapping("/b")
    public String test(String m) {
        if (m != null) {
            throw new CustomizeException(m);
        } else {
            return m;
        }

    }

    @RequestMapping("/c")
    public String tt(String m) {
        if (m != null) {
            //new AimeiScopException("HAVE_NO_RIGHT");
            return "";
        } else {
            return m;
        }

    }
}
